package com.conncui.io.file;

import java.io.File;

public class FileUtis {
    public static final String PATH_SEPARATOR = File.separator;
    public static final String AndroidProjectRootPath =  FileUtis.class.getProtectionDomain().getCodeSource().getLocation().toString();

    public static String getAndroidProjectRootPath(){
        String classLocation =  FileUtis.class.getProtectionDomain().getCodeSource().getLocation().toString();
        classLocation =  classLocation.substring(
                0,
                classLocation.indexOf("AndroidProject")+"AndroidProject".length()
        );
        classLocation = classLocation.replace("file:","");
        return classLocation;

    }
    public static void main(String[] args){
        System.out.println("AndroidProject RootPath:"+FileUtis.getAndroidProjectRootPath());
    }


}
